<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>WebSSH</title>
</head>

<body>

    <!-- <embed src="http://10.120.65.140:2240/api/webssh/?hostname=localhost&username=root&password=cGFzc3dk" id="iframe"
        name="iframe" height="70%" width="100%" scrolling="auto" frameborder="0" onload="changeFrameHeight()" /> -->

    <!-- <iframe src="http://10.120.65.140:2240/api/webssh/?hostname=localhost&username=root&password=cGFzc3dk" height="70%" -->

    <iframe height="1960px" width="100%" id="iframe" name="iframe" id="iframe"
            src="/api/file_upload/WebSSH/"
            onload="changeFrameHeight()">
    </iframe>

<!--    <button onclick="accept()">接受</button>-->

<!--    <button onclick="reject()">拒绝</button>-->


    <script>
        function accept() {
            console.log('~~~~~~~~~~ accept!');
        }

        function changeFrameHeight() {
            var iframe = document.getElementById("iframe");
            iframe.height = document.documentElement.clientHeight * 0.94;
        }
        //onresize属性可以用来获取或设置当前窗口的resize事件的事件处理函数
        //onresize事件会在窗口或框架被调整大小时发生
        window.onresize = function () {
            changeFrameHeight();
        }
    </script>

</body>

</html>